since this has been refactored, i would rather have def usage(errorstring): that outputs proper usage + errorstring for example. its nicer to the user. Check the USAGE part of the original script