stepType = getCurrentStepType(stepType, steps);
// Do the migration.
Exception firstException = null;
try {
step.migrate(stepInput, stepOutput, stepType);
} catch (ResourceMigrationException e) {
firstException = e;
} finally {
try {
stepInput.close();