LEAD-196 added to check if file is invalid.