Add debug statements to see flow