Added tryCatch to CSharp