Move out some debug sthnigs