Small Change: Moved tiny bit from view to fileio

tiny bit of the file handling logic