edit file and add dir