tranfer xferOK to detect errors and run cleanup