put try block around entire script