@itnihao some pylint fixes, we should also be using with statements

to open and edit files