added fileio and test