added some simple error handling when launching an instance