catch nbformaterror properly