Fixed a bug in CHECK function. More pretty print for fatal errors.