#371 Update file protection condition

@mturalenka Please review 
(The last pull request was closed because of touched unnecessary string formatting by NetBeans)
its better to use functions `empty` or `isset`