Fix file mangling, ftruncate file before saving
4 files changed