Add a method to log the output of gradlew into a file.