Fix wrong behavior when annotations became empty
Add method to exculde files from tracking when editor closed