ff4d: improve exception logging for debugging