Implemented clearLog function