updated SampleQuery.js to accept args
print exception trace in ASim