Fix some print statements;
Print help if no options passed;
Fix function name consistency;
Fix writepgid function