logging and copying files