added mode to file