Added buffered read write