Log corner case
Much better exception handling.