I added the access mode "wb".