regenerate service file only when needed