invalid file error fix

fixes #7