Adding a clean way to extract the thread dump content without cleaning catalina.out log file.
Changing sleep time of stop command.