Moved the file entry class into a separate file and made it into a prototype as it should be.  Also fixed the hack of an attempt in overwriting files.