Updated error handling to be more informative

Signed-off-by: bergerkiller <bergerkiller@gmail.com>