plugin runs in separate thread, clears messages before running