error handling for contract creation