Move logging to a seperate file