Using pid files for killing processes