Write log to file and console at the same time