Truncate output files created in store_png
1495674
Use io::Truncate instead of io::Open for file mode.