Change name of methods, add closing dialog when error occur.