put all file commands into directory section, added a preview flag to avoid overwriting files, and changed back up file to compile current version.