add handler for NOTICE's as well. Simplify main() even more