added mode to log