added file related functions