#103 added option to write different file format in the same run