Add debug statements to controller