These three `try` `catch` blocks could be amalgamated, if nothing else but to make the code nicer to read.