Make sure we tidy up temp files in all cases. Add **** to comments that suggest changes. Properly use $new_crop