Add some error handling for creating transactions