Updated read, write, clear to use open3