Added logging
added userId to logging