File validity check v.2