support file input and add testing case file