Refactor
Unit test for copy_local_files