Added Logger class and replaced stacktrace prints with logger facility