added logging also to the unanticipated exception catch block.