Add a debug fucntion which helps using gdb on running daemon.
Correct minor coding errors.
Modify srun man page to avoid possible confusion.