The authorities made serious errors both before and after last month's tragedy in Derna, the BBC is told.