Add auto data type conversion for read and write