Right now, the timeout is happening at the artifact level instead of the command level. For example, while capturing a thread dump using jstack, if it times out, the yc script is transmitting the empty thread dump file instead of attempting 2nd step using Jattach.