Add local variable to capture the bundle exec return code in migrated