use flock as it provides per-fd file locking (suitable for locking from
multiple threads, each using a separate fd)
cleanup of old fake BU output module which is no longer usable
logging with MessageLogger in a few more places