Dont' use printstacktrace, use logging as the TODO says...