Add error handling when read or write fail