io.IOBase does not have read, file_d is not used
use log instead of print
Merge pull request #136 from Cybjit/master

Python 3 fixes