Fixing pidfile handling and stop spamming the logs.