removed excessive logging
added guard to prevent crash on certain jre versions