bug 896546 also fails with 'Invalid argument' but in targetfh.close() while here is failed in targetfh.write(buf)
bug 896546 also fails with 'Invalid argument' but in targetfh.close() while here is failed in targetfh.write(buf)