Wrapper for handling dialogs