added printstacktrace