bailout should print error msg
added option that turns it into head and tail; examples of that; bailout() instead of sys.exit() in a couple of cases