Added more error handling
Lowered the deployment target to 10.9