More error logging added.