better error handling and status reporting in file transference (patches taken from mod-pacmanager)