Move database logging to file from console