Add read length checking