add format and exception listeners