log.py: fixed missing newline when file output is used