Change if statement in readfile