Added Log function to output to console and to file