error doesnt automatically print out in readdata