Improved res logging