timeout management + logging to file