fixing issue with stat not returning when dir not existant