Fix error where logging was not recorded