Add file logging code.