Revert to working version and then apply logging