Save log to a file