Extraction of nested try catch in migrateServer