functions related to file.