refactoring, add js for file button