<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def write_rtag(opts):
    '''
    Write the rtag file
    '''
    rtag_file = rtag(opts)
    if not os.path.exists(rtag_file):
        try:
            with salt.utils.files.fopen(rtag_file, 'w+'):
                pass
        except OSError as exc:
            log.warning('Encountered error writing rtag: %s', exc.__str__())