bug fix to file loading