fix order & instrument duplicate issue, loggin error handling, quary error handling