Finish copy_file_count_lines function