Fix for issue #250. Added check and logged exception to exception log.