private void pause(String delayInMillis) {
   try {
     Thread.sleep(Long.parseLong(delayInMillis));
   } catch (Exception e) {
     LOG.warn("Pause command interrupted", e);
   }
 }
 private void delayIfNeeded(long delay) {
   if (delay > 0) {
     try {
       Thread.sleep(delay);
     } catch (Exception e) {
       LOG.warn("Step delay sleep command interrupted", e);
     }
   }
 }