Add error cases in new functions and remove todo comment. Co-Authored-By: kchadha <kchadha@media.mit.edu>