Fixed Uncaught TypeError: Cannot read property 'files' of undefined