def stash_log(log_str, name_base):
    with open(os.path.join(dirname, (name_base + '.log')), 'w') as f:
        f.write(log_str)
def stash_log(log_str, name_base):
    with open(os.path.join(dirname, (name_base + '.log')), 'w') as f:
        f.write(log_str)