Enhanced logging to use both file and console handlers.