Moved file io related things into FileStuff class