State officials say a beaver dam is to blame for a train derailment in Sandwich Academy Grant in Somerset County in 2023.