fix bug and edit file input