Fixes bug where two outputs were occuring on failing to connect to MySQL