Hopefully fixed an issue with locking file appending.