Update plugin.js

check if files is empty