minor improvements for copying files