File validation is now performed after fetching in a single part of the code