log to both file and console