Add loss reason debugging