bug|saveFileAs() didn't write to file