some work on file function(2)