Working on getting write to work with the mainFunction.py file