add at_exit to display a more useful warning message to user