classify the file to different dirs