deal main file
function files