Another fix for deletefile in wrapper.py