XD-1938: Prevent shell crash in completion

- Add logging