move error controller to java.utilities
add logging for junit tests