Better Error handling is added