imporved error handling and logging in revs diff