Resolves bherila/n2cms#3 by handling exception cases gracefully