Adding debugging print statements to MainState