Small change to main try-except clause