keyboardInterrupt error handled
time logging added