Improved logging. Fixed error occurring upon rollback.