added timeout to exec_script, will abort if query is taking too long