handle mkdir failure with @ and short circuit logic