Add some debug logging statements

Added debug logging statements to track the variable and state changes
during application runtime.