Save output of rebuild to log file

Hmm, I see that you asked something similar a few years ago, perhaps this?