fixed up file bugs