To get a better exit code handling including logrus logging I have defined a custom errors package which uses logrus to log error messages.