The main functions are wrapped by a sys.exit function which expects and argument. The curent implementation isn't returning values in all cases. This change ensures main functions return a value in all cases.