Use sha for updating, debug version
Remove trailing \n
Use SHA based comparison for updates