Devices such as NVMe can have blocks bigger that 512. Use the m_block_size variable in read/write_block function instead of the hardcoded 512 block size.