Added logging, Exercise A.c