moving file check out of load method and into loadFile