Small tweaks to file saving