* bugfix: saving to the same file after the file size had been decreased sometimes made the file corrupt