improved error output and implemented clearHistory()