added check for connection status before extracting SQL from buffer
Merge branch 'dev' into filterharness