Changed how the proces name is compared with pid file handling