improved support for program timeout