Adding a timeout to shell handler execution