Remove duplicated get_pid() code
Typo in logging message
Remove duplicated delpid() code
Better error message in case the pidfile exists but is not readable
Alert on stderr if we could not delete the pidfile
When starting, check that a pidfile exists instead of a pid can be read from it