added try catch for main script