Adapted for Python 3.3* version
Fixed redudant logs