Use console instead of MessageDialog.