LoggingBaseCommand
fixed error handling in management commands