made pageSize immutable again.  keep a lock when writing the header.