<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lookupfile(filename):
 """Returns dictionary of file content as well as google reverse GEO data"""

    logger.info('Looking up %s'%(filename))

    # First open cache file to see if we already looked up this stuff
    dirname=os.path.dirname(filename)
    basefilename=os.path.basename(filename)

    CACHE_FILE = os.path.join(dirname,'.'+basefilename+'.gpscache')
    cache=loadCacheFile(CACHE_FILE)

    # Get the input file
    positions=parsePositionFile(filename)

    # If load didn't work, read again and lookup
    if not cache:
        logger.info("%s - No cache file found, looking up location"\
                %(basefilename))
        cache=lookupGeoInfo(positions)
        # Save to DB
        json.dump(cache,open(CACHE_FILE,'w'))
    else:
        logger.info("%s - Found cache file for locations"\
                %(basefilename))

    return positions,cache