add a utility function to print a message to stderr and then quit