A little bit more logging and checking