remove debugging statement introduced in e479563244d207c5e2a9915bc526fda794aa073e
add pre-search callback
add a flag telling if a search is in the process of being executed