Now checking if pid already exists and removes old pidfiles