Now flush() returns 'bytes' and 'err' as described in README