Error in read/seek methods. Need to be fixed