Improved the way we handle the saving of a file.