cleaning up file helper methods