Add tests for log files and improve shared tests.