The file should be open like binary file, this got an error with python3