Add unit test to ensure that if there is an error, entire script is rolled back