Restrict file logging to DEBUG builds