Resolves bherila/n2cms#19 by handling exception cases gracefully