Fixed handling of error output on redis/mongo connection failures