move common file methods to FileUtility