Fixed error showing in case of file reopening