added return value to loadFile