refactor to use new configuration
fix return code of wrapper script