Fix for get_class error

A modified version of the log function to get rid of the error when a
string is passed to get class..