Updated to generate log entry only after transfer completes