ctdlmigrate: changed flow of program to avoid gotos, changed SSH to fork()