Attemping to use nBytes in read/write reg functions