File input corrections

Improvements to the file input method