replace clean_paths with preserve_paths