Add '-s' arg. Modify '-f' arg to save more files
fix bug in fmt_str for writing