Appium logs and multiple run of a test case

I am running my test cases(around 4-6) in a loop like for 100 times on an android device, but after 30 runs its closing the driver. I checked the logs but couldnot figured it out. Seems like console of appium is getting overrided too much.
Then one more thing can we get the logs of appium on a text file?? i am giving path of a folder on “Log To file” option but its returning " Tried to attach logging to file C:\Users\perf1\appiumlogs but an error occurred: undefined".

Need Help, Thanks in advance

Hmm. If you ran appium from the command line, you can just pipe the output to a file.

That might actually fix your whole problem.