Added error handler, will add to dev soon