fixed external file copying