The death of a young boy who fell down an open manhole at a construction site could have been avoided, a sheriff has determined.