Fixes duplicate code

Fixed duplicate call for file attributes checking