Bug fix: incorrect input file reading

Merged Theophile GENTILHOMME requested to merge bugfix into master

Merge request reports