Bug fix: saveFile() doesn't always save the most recent file content.