Added directing console output to file