Options added to allow a function to be passed to override the default show dialog handler