Added exception in place of log message for class check