convert_image now works
switched cleanup function