add file model and function to baseController