Decorators, and a fileobj opened for writing already raises an exception when you try to call the read() method