print hash to file