add filenames to error messages of copy()