          """ Write the serialized alignments file """
          alignfile = self.get_alignments_path()
  
          if hasattr(self.args, 'skip_existing') and self.args.skip_existing:
              faces_detected = self.load_skip_alignments(alignfile, faces_detected)
  
          try:
              print("Writing alignments to: {}".format(alignfile))
              with open(alignfile, self.serializer.woptions) as align:
                  align.write(self.serializer.marshal(faces_detected))
 
</s> remove         alignfile = self.get_alignments_path()

 </s> add  </s> remove             print("Writing alignments to: {}".format(alignfile))
            with open(alignfile, self.serializer.woptions) as align:
 </s> add             print("Writing alignments to: {}".format(self.alignments_path))
            with open(self.alignments_path, self.serializer.woptions) as align: </s> remove             print("{} not written!".format(alignfile))
 </s> add             print("{} not written!".format(self.alignments_path)) </s> remove         alignfile = self.get_alignments_path()
 </s> add  </s> remove             with open(alignfile, self.serializer.roptions) as align:
 </s> add             with open(self.alignments_path, self.serializer.roptions) as align:
            faces_detected = self.load_skip_alignments(self.alignments_path, faces_detected)
          """ Write the serialized alignments file """
          alignfile = self.get_alignments_path()
  
          if hasattr(self.args, 'skip_existing') and self.args.skip_existing:
            faces_detected = self.load_skip_alignments(self.alignments_path, faces_detected)
  
          try:
              print("Writing alignments to: {}".format(alignfile))
              with open(alignfile, self.serializer.woptions) as align:
                  align.write(self.serializer.marshal(faces_detected))
keep keep keep keep replace keep keep keep keep keep
 Cli/Scripts Refactor (#374)

* Refactor for PEP 8 and split process function

* Remove backwards compatibility for skip frames

* Split optional functions into own class. Make functions more modular

* train.py - Fix write image bug. Make more modular

* convert.py: Extract alignments from frames if they don't exist

* BugFix: SkipExisting broken since face name refactor

* train.py - Semi-fix for hang on reaching target iteration. Now quits on preview mode
Make tensorflow / system warning less verbose

* Final bugfixes

* Add 'all' back in for selectable detectors

* Final minor tweaks 
scripts/fsmedia.py