added logging mechanism
added logging mechanism