tests writes to log file instead of stdout