added better support for clear, reset and dumpToLog