Modified the exit code check so several sequence can be use in the query file