refactored nack handling a bit to make the code more readable

for the examples only log level info by default to cut down on the noise