Update timelog scripts

- Make to always exit 1 if timer not running
- Avoid potential time gaps when switching tasks using ti while timer is running