Fix error reporting to main script in tutorial2