Added showing stack trace for warn, error and fatal. Added dumping references if first element is a reference