fixes to file loadign