Added logging in exec