* added test for cli to ensure it does not exit after command error
* formatted resultwriter as a module