write info to file