Added debugging messages in stage one.