added debug for migrate