fixes for file copying