better logging both in console and file