add a log statement when a file is closed