rewrote file dialogs