Improve fix for log file generated

Same as [this PR](https://github.com/excilys/androidannotations/pull/1289) but improved.
Fixed with 2964494.