fixed error for read, if path is not correct