Helper script to generate device config file