improve error messages on copy to and copy from