Error handler

Added custom error handler to improve the chances of this project making everything work perfectly!