Removed  'count'er in SQL table.
Removed 'count'er in SQL table. Added better file detection