Debug message is now more readable and catches all exception types.