debugged and added fileDialogs and warnings