That change is good but it needs a comment. You don't need to go into great detail, just say that we call fprintf+fclose after clearing the hooks to match how mtrace called fopen+fprintf before setting them. Thanks, Roland