store array to file