more consistent logging

- avoid System.out
- more robust error logging in ErrorServlet
unified logging, helper functions to log DOMs
update maven pom to use the same java language level as ant
removed possible NPEs