River script improvements, Error debugging