removed file open byte mode as it's not necessary in python 3