add possibility to clear log; remove "printf" macros