@mruzicka I think we want to use puppet's built-in `Puppet::Util.replace_file` method to ensure we write files securely and atomically (we write to a tempfile and then rename)