Writes a file to disk

def _write_file_network(data, filename):
    '''
    Writes a file to disk
    '''
    with salt.utils.files.fopen(filename, 'w') as fp_:
        fp_.write(salt.utils.stringutils.to_str(data))