Extra error logging added.