Add timeout for running external processes