Added logging and initial debug steps