Add debugging statements to chapters_controller