error with file and loc