format and remove useless files