changed file method to use File io String