handled undefined in logging