added debugging messages to formatter