Fixes bug where image data was not being updated

Explicitly delete the raw file.

Also cleans up output in javascript console for clarity.