moved Thread.sleep, used Logger instead of Stacktrace, reformatted lines.