Fixes inputting/outputting files