Modify annotate.py add check database before search