Logging printStackTrace to file