catch exception of os.remove