Added logs to display errors based on classes