added break if logname cannot determine username