initial error checking and open dialog implemented