Added option to not close command window when done