Added logging to close mantis issue 4022