Added condition to extractFileInformation method