Add debug information. Related to #250 #251.