FileHistory: fix closing