Check file information before unserializing [fixed tracker #1595]