XD-1938: Prevent shell crash in completion

so wouldn't it be good to do a bit of logging then?