Threaded alert

Also change alert logging to contain all relevant info in single lines (with multiple threads logs would get screwed up)