I would check first whether the file exists, to avoid erasing the user security config by mistake (when forgetting to remove the composer script in the project)