refactored setupAlertBox to setupModal, it's more flexible now. added re-open confirmation when loading site after closing with a file open