Brooklyn man charged for trying to rape woman on Upper West Side in July