add debug flag
format seconds centrally, close new tab automatically