def setup():
    try:
        if not os.path.exists(log_file):
            os.system('sudo touch ' + log_file)
            sleep(1)

        os.system('sudo chmod 775 ' + log_file)
        sleep(1)

    except Exception as e:
        print("error writing logfile:",e)
        writeable = False

    os.system('echo \x22\x23 SERIAL LOG\n\x23 ' + str(f'{datetime.today():%h %e %Y}') + '\n\x22 | sudo tee ' + log_file + hide)
