More control over file descriptors closing (temporary files)