Add log writing into a file