Added more error detection code to the frontend to try and make our error messages a bit more descriptive when things don't work