build replaces nlog file for res if present in env