export save dialog and testing file writing