Changed fail to catch for promise error handling