Log full exception from cmd_function() crashes