added a clean_dirs function in mission