now, it writes log in file