Fix a bug that --log-file is ignored