Fix for OpenJDK / remove System.lineSeparator
Add catch block for RuntimeMBeanException