SampleQuery: stop running when error
Added code to calculate average F1
added high pass filter for edge