When logger.error, replace process.exit(1) with throw new Error(). See #128