added functionality: multiple tries to process an image if it's not working out. uploading the error log to the webserver for easy access