Logger class. I hope it should guard from writing in one file from two processes. Not tested yet.