Fixed a crash when no data file is selected and also improved creating new sheets.