useful functions of file