Changed how readFile handles files - better practice