Fixed file validation