fixed creation of pid files

Fixed typo in creation of pid files.