Added timeout to task executor.