added the timeout parameter for long running commands