closedir just a bit earlier in templates/list-files.php