Added logging in