added logging using nclog