Added support for saving TGF files