Working on graceful error handling

Signed-off-by: Siddhartha Gupta <makerzzz.zzzz@gmail.com>