Add binary write support