begin cleaning up callbacks, make sure images are deleted on error