Fixing bug where png files were not overwritten