bugfix for image cleanup and python script calling by subprocess shell