error handling on rmtree