modify copy_file target check