logging to file and console