Update script to add some logging