Updated to new logging mechanism (working)