Add threaddump and tidy options to control script
Some tab cleanup on control script
Fix threaddump pid logic