add timeout to recordtofile