A few bugfixes to error handling whilst setting up dev environment